<#include "../header.ftl" />
<@head title="修改个人资料" />
		<script type="text/javascript" src="${base}/script/mlog.form.js" charset="utf-8"></script>
		<script type="text/javascript" src="${base}/script/jquery-validation/jquery.validate.js"></script>
		<script type="text/javascript" src="${base}/script/jquery-validation/jquery.metadata.js"></script>
		<script type="text/javascript" src="${base}/script/jquery-validation/validate.method.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				mlog.form.validate({
					selector : "#userForm",
					errorLabelContainer : "#error",
					wrapper: 'li',
					onfocusout : false,
					onkeyup : false,
					onclick : false
				});
			});
		</script>
		<@side.sidenav active="修改个人资料"/>
	    <div class="g-content">
	        <div class="g-content-container">
	            <div class="g-p">
					<div class="m-crumb">
					    <ul class="f-cb">
					        <li><i>&gt;</i><a href="#">博客管理</a></li>
					        <li><i>&gt;</i><a href="#">修改个人资料</a></li>
					    </ul>
					</div>
					<div class="page-title">
						<h1>修改个人资料</h1>
					</div>
					<div class="m-content">
						<div id="error" class="message error" style="display:none;"></div>
						<form name="userForm" id="userForm" action="${spaceUrl}/admin/user/info/do" method="POST">
							<@spring.bind "user" />
							<@spring.formHiddenInput path="user.id" />
							<@spring.formHiddenInput path="user.name" />
							<@spring.formHiddenInput path="user.createTime" />
							<@spring.formHiddenInput path="user.password" />
							<@spring.formHiddenInput path="user.largeAvatar" />
							<@spring.formHiddenInput path="user.smallAvatar" />
							<div class="label">
								<span class="title">昵称：</span>
								<@spring.formInput path="user.alias" attributes='validate=\'{required:true,maxlength:10, userAliasExists:{id:"${user.id}"}, messages:{required:"请输入昵称", maxlength:"昵称字数不能超过{0}",userAliasExists:"用户昵称已经存在"}}\' placeholder="请输入昵称" class="input input-large" ' />
							</div>
							<div class="label">
								<span class="title">邮箱：</span>
								<@spring.formInput path="user.email" attributes='validate=\'{required: true, email:true, userEmailExists:{id:"${user.id}"}, messages:{required:"请输入邮箱", email:"邮箱格式不正确", userEmailExists:"邮箱已经存在"}}\' placeholder="请输入邮箱" class="input input-large"' />
							</div>
							<div class="label">
								<input type="submit" class="button" value="提交" style="margin-left:46px;"/>
							</div>
						</form>
					</div>
	            </div>
	        </div>
	    </div>
<#include "../footer.ftl" />